package net.wofly.sale.commission.domain;

import io.swagger.annotations.ApiModel;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 佣金配置
 * <ol>
 * 	<li>根据与用户来配置。</li>
 * 	<li>如果能找个指定此人的配置，优先使用人的佣金设置。</li>
 * 	<li>然后再使用根据角色的设置</li>
 * </ol>
 * @author lign
 * @version 1.0
 * @created 31-十二月-2017 10:39:55
 */
@Data
@Entity
@Table(name = "sale_commodity_commissioncfg")
@ApiModel(description = "佣金配置")
public class CommissionCfg {

	@Id
	private String commissionCfgID;
	/**
	 * 提成比例
	 */
	private Integer commissionRate;

	/**
	 * 提成比例分母
	 */
	private Integer denominator;
	private Long modifyDate;
	/**
	 * 操作人员ID
	 */
	private String optUserID;
	/**
	 * 角色id
	 */
	private String roleID;
	/**
	 * 状态
	 */
	private Integer status = 1;
	/**
	 * 用户id
	 */
	private String userID = "0";

	@Transient
	private String commissionRateStr;

	public CommissionCfg(){

	}

}